<?php
namespace Api\Controller;
use Think\Controller;
class ClubController extends Controller {

    /*俱乐部列表  开发人：周弈男*/
    public function allclub(){
       $club=M('club');
       $club=$club->select();
       if($club==null){
          $this->ajaxReturn(null);
       }else{
          $this->ajaxReturn($club);
       }
    }
    /*俱乐部信息  开发人：周弈男*/
    public function getclub(){
       $clubid=$_GET['clubid'];
       $club=M('club');
       $club=$club->where("clubid=$clubid")->find();
       if($club==null){
          $this->ajaxReturn($club);
       }else{
          $this->ajaxReturn($club);
       }
    }
    /*教练信息*/
    public function getclubcoach(){
      $clubid=$_GET['clubid'];
      $coach=M('coach');
      $coach=$coach->where("club=$clubid")->select();
      if ($coach==null){
        $this->ajaxReturn($coach);
      }else{
        $this->ajaxReturn($coach);
      }
    }
  }